﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DeviceManager.BusinessLogicLayer;
using DeviceManager.DataAccessLayer;
using System.Data.Entity;

namespace DeviceManagementIT.DevicesManager.Unit
{
    public partial class frmAddUnit : DevExpress.XtraEditors.XtraForm
    {
        UnitBllOperation u_UnitBllOperation=new UnitBllOperation();
        public frmAddUnit()
        {
            InitializeComponent();
        }

        private void btnInsertUnit_Click(object sender, EventArgs e)
        {
            DONVITINH d_DONVITINH=new DONVITINH();
            d_DONVITINH.TenDVT=txtUnitName.Text;
            d_DONVITINH.DienGiai=mmUnitHelp.Text;
            string message=u_UnitBllOperation.SaveRecordUnit(d_DONVITINH);
            MessageBox.Show(message,"Message");
        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}